﻿@model IEnumerable<HdipCricketClub.Models.Fixture>

@{
    ViewBag.Title = "Fixtures:";
}

<h2>@ViewBag.Title</h2>

@using (@Html.BeginForm())
{
    <p>
        Search by Team: @Html.TextBox("searchString")
        <input type="submit" value="Search" /> 
    </p>
}



<table>
    <tr>
        <th>
            Team:
        </th>
        <th>
            Opponent:
        </th>
        <th>
            Type:
        </th>
        <th>
            Home:
        </th>
        <th>
            Date:
        </th>
        <th>
            Start Time:
        </th>
     </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Team.name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Opponent.club_name) @Html.DisplayFor(modelItem => item.Opponent.team_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.type)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.home)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.date)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.start_time)
        </td>
    </tr>
}
</table>
